package com.gitee.zhuyb.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @version 1.0.0
 * @Description: #类描述
 * @Date: 2021/12/25 11:18
 * @Copyright (C) ZhuYouBin
 */
@RestController
@RequestMapping("/export")
public class TestController {

    @Autowired
    private IExportService iExportService;

    @RequestMapping("/word")
    public void exportWord(HttpServletRequest request, HttpServletResponse response) {
        try {
            iExportService.exportWord(response);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @RequestMapping("/poi/word")
    public void exportWordByPoi(HttpServletRequest request, HttpServletResponse response) {
        try {
            iExportService.exportWordByPoi(response);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
